﻿# CMakeList.txt: mysqlAPI 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#
project(mysqlAPI CXX)

cmake_minimum_required (VERSION 3.8)

#根据自己安装的库目录自行修改
set(Boost_INCLUDE_DIR "C:/local/boost_1_73_0")
set(MySQLConnector "C:/Program Files/MySQL/Connector C++ 8.0")

find_package(Boost 1.73 REQUIRED)

include_directories(${MySQLConnector}/include)
include_directories(${Boost_INCLUDE_DIRS})

add_executable (mysqlAPI "mysql_database.h" "mysql_def.h" "main.cpp" "mysqlAPI.cpp" "mysqlAPI.h")

target_link_libraries(mysqlAPI ${MySQLConnector}/lib64/vs14/mysqlcppconn.lib)
target_link_libraries(mysqlAPI ${Boost_LIBRARIES})